﻿using System.Globalization;
using System.Windows.Data;

namespace WpfApp3CollectionBindingGrouping
{
    internal class ThreadsToGroupConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            //var count = (int)value;
            //return count / 10;

            var count = (int)value;
            string text = string.Format("{0}-{1}", count==0?1:count*10, count*10+9);
            return text;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}